import { Get, Controller, Post, Body } from '@nestjs/common';
import { ChatService } from './chat.service';
import { ChatGetModalDto } from './dto/chat-getModal';
// import { CustomerService } from './chat.service';
// import { UserService2 } from '../user/user.service';
// import { CreateCustomerDto } from './dto/create-customer.dto';

@Controller('chat')
export class ChatController {
  constructor(private readonly chatService: ChatService) {} // private readonly userService2: UserService2, // private readonly customerService: CustomerService,
  @Get('/')
  findOne() {
    return 'this is chat';
  }

  @Post('/getModal')
  async getModal(@Body() body: ChatGetModalDto) {
    return await this.chatService.getModal(body);
  }

  @Post('/getChain')
  async getChain(@Body() body: ChatGetModalDto) {
    return await this.chatService.getChain(body);
  }

  @Post('/getParse')
  async getParse(@Body() body: ChatGetModalDto) {
    return await this.chatService.getParse(body);
  }

  @Post('/getDocument')
  async getDocument(@Body() body: ChatGetModalDto) {
    return await this.chatService.getDocument(body);
  }
  @Post('/getAgent')
  async getAgent() {
    return await this.chatService.getAgent();
  }
  @Post('/getMemory')
  async getMemory() {
    return await this.chatService.getMemory();
  }
  // @Post('/use/:name')
  // findCustomerName(
  //   @Query() query: CreateCustomerDto,
  //   @Body() body: CreateCustomerDto,
  //   @Param() param: { name: string },
  // ) {
  //   console.log(JSON.stringify(param.name, null, 2));
  //   console.log(JSON.stringify(body, null, 2));
  //   console.log(JSON.stringify(query, null, 2));
  //   return this.customerService.getCustomer(body);
  // }
  // @Get('/3')
  // findOne3() {
  //   return this.userService2.getUser('/customer/3');
  // }

  // @Post('/allList')
  // findAll() {
  //   return [
  //     {
  //       name: 'zs',
  //       age: 23,
  //       gender: 'male',
  //     },
  //     {
  //       name: 'ls',
  //       age: 24,
  //       gender: 'female',
  //     },
  //   ];
  // }
}
